#!/bin/sh

netif_pre_up() {
    require local remote
    try ip tunnel add $interface mode sit remote $remote local $local ttl 255
    try ip addr add $ipaddr dev $interface
}

netif_post_up() {
    try ip route add ::/0 dev $interface
}

netif_pre_down() {
    ip route del ::/0 dev $interface
}

netif_post_down() {
    ip tunnel del $interface
}

